home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / vmed.arc / ED3A.CCC < prev    next >
Text File  |  1985-12-03  |  1KB  |  72 lines

  1. /*    Screen editor:    command mode commands (extra)
  2.  *
  3.  *    Module: ed3a/ccc
  4.  *    Date: November 14, 1983
  5.  *    Changed: February 19, 1984
  6.  */
  7.  
  8. /* message handler */
  9. outm(numb)    char numb;
  10. {    char    *sptr;
  11.     switch(numb)     {
  12.         case    badmove:
  13.             sptr = "invalid move";
  14.             break;
  15.         case    badcopy:
  16.             sptr = "invalid copy";
  17.             break;
  18.         case    backwards:
  19.             sptr = "can't output backwards";
  20.             break;
  21.         case    filenot:
  22.             sptr = "file not found";
  23.             break;
  24.         case    noarg:
  25.             sptr = "no file argument";
  26.             break;
  27.         case    patnotfnd:
  28.             sptr = "pattern not found";
  29.             break;
  30.         case    linetrun:
  31.             sptr = "line truncated";
  32.             break;
  33.         case    filname:
  34.             sptr = "file not named";
  35.             break;
  36.         case    cancel:
  37.             sptr = "cancelled";
  38.             break;
  39.         case    toomany:
  40.             sptr = "too many ?'s in change mask";
  41.             break;
  42.         case    badarg:
  43.             sptr = "bad argument";
  44.             break;
  45.         case    nltolong:
  46.             sptr = "new line too long";
  47.             break;
  48.         case    badnum:
  49.             sptr = "bad line number";
  50.             break;
  51.         case    cmdfnd:
  52.             sptr = "command not found";
  53.             break;
  54.         case    smask:
  55.             sptr = "search mask? ";
  56.             break;
  57.         default:
  58.             syserr("Unknown Message Code");
  59.             return;
  60.     }
  61.     if (numb >= smask)
  62.         fmtsout(sptr,0);
  63.     else
  64.         message(sptr);
  65. }
  66.  
  67. /* print message from a command */
  68. message(s)     char *s;
  69. {     fmtsout(s,0);
  70.     fmtcrlf();
  71. }
  72.